/*
 * Copyright (c) 2017. 深圳一七网络科技. All rights reserved.
 */

package com.fenxiangle.yueding.feature.publish.contract;

import com.amap.api.services.core.PoiItem;
import com.fenxiangle.yueding.entity.bo.FoucsBo;
import com.fenxiangle.yueding.entity.bo.FoucsListBo;
import com.fenxiangle.yueding.entity.bo.OrderBo;
import com.fenxiangle.yueding.entity.bo.PageBo;
import com.fenxiangle.yueding.entity.bo.PayBo;
import com.fenxiangle.yueding.entity.bo.PublishBo;
import com.fenxiangle.yueding.entity.bo.PublishDemandBo;
import com.fenxiangle.yueding.entity.bo.UserCenterBo;
import com.suozhang.framework.framework.BasePresenter;
import com.suozhang.framework.framework.BaseView;

import java.io.File;
import java.util.List;
import java.util.Map;

import io.reactivex.Observable;

/**
 * LIJUWEN
 *
 * @email yiyayiyayaoljw@gmail.com
 * @date 2017/4/11 9:06
 */
public interface PublishContract {

    interface Model {
        Observable<OrderBo> publishDemand(PublishBo publishBo);

        Observable<OrderBo> publishInvite(PublishBo publishBo);

        Observable<List<PublishDemandBo>> getPublishDemandList(PageBo publishBo);

        Observable<List<PublishDemandBo>> getPublishInviteList(PageBo publishBo);

        Observable<String> cancleInvitedOrder(OrderBo publishBo);

        Observable<String> confrimInvitedOrder(OrderBo publishBo);

        Observable<PublishBo> txOrder(OrderBo publishBo);

        Observable<String> txWeiquan(OrderBo publishBo);
    }

    interface View extends BaseView {

        void showPublishSuccess(OrderBo s);

        void showError(String error);//显示错误消息
        void showInsufficientBalance();//显示余额不足
        void showPublishListSuccess(List<PublishDemandBo> workBoPageData);

        void showPublishListError(String error);

        void showPublishListMoreSuccess(List<PublishDemandBo> msg);

        void showPublishListMoreError(String msg);

        void showPublishListEmpty();

        void showcancleOrderSuccess();

        void showConfrimOrderSuccess();

        void showConfrimTxSuccess();

        void showWeiQunanOrderSuccess();
    }


    interface Presenter extends BasePresenter {//

        void publishDemand(int type,
                           String occupation,
                           String describe,
                           String numPeople,
                           String startTime,
                           String endTime,
                           PoiItem poiItem,
                           String unitPrice,
                           String totalPrice,
                           int credit
        );

        void publishInvite(
                int type,
                String invitationUserUid,
                String describe,
                String startTime,
                String endTime,
                String agreedPlace,
                String coordinate,
                String totalPrice
        );

        void getPublishDemandList(int pageNow,
                                  int pageSize);

        void getPublishDemandListMore(int pageNow,
                                      int pageSize);

        void getPublishInviteList(int pageNow,
                                  int pageSize, Integer type);

        void getPublishInviteListMore(int pageNow,
                                      int pageSize, Integer type);

        void cancleInvitedOrder(String orderId,String type);

        void cancleConfrimOrder(String orderId,String acceptUserUid);

        void txOrder(String orderId);

        void txWeiquan(String orderId, String defendant);
    }
}
